{"ast":null,"code":"import { placements } from \"rc-tooltip/es/placements\";\nconst autoAdjustOverflowEnabled = {\n  adjustX: 1,\n  adjustY: 1\n};\nconst autoAdjustOverflowDisabled = {\n  adjustX: 0,\n  adjustY: 0\n};\nconst targetOffset = [0, 0];\nexport function getOverflowOptions(autoAdjustOverflow) {\n  if (typeof autoAdjustOverflow === 'boolean') {\n    return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled;\n  }\n  return Object.assign(Object.assign({}, autoAdjustOverflowDisabled), autoAdjustOverflow);\n}\nexport default function getPlacements(config) {\n  const {\n    arrowWidth = 4,\n    horizontalArrowShift = 16,\n    verticalArrowShift = 8,\n    autoAdjustOverflow,\n    arrowPointAtCenter\n  } = config;\n  const placementMap = {\n    left: {\n      points: ['cr', 'cl'],\n      offset: [-4, 0]\n    },\n    right: {\n      points: ['cl', 'cr'],\n      offset: [4, 0]\n    },\n    top: {\n      points: ['bc', 'tc'],\n      offset: [0, -4]\n    },\n    bottom: {\n      points: ['tc', 'bc'],\n      offset: [0, 4]\n    },\n    topLeft: {\n      points: ['bl', 'tc'],\n      offset: [-(horizontalArrowShift + arrowWidth), -4]\n    },\n    leftTop: {\n      points: ['tr', 'cl'],\n      offset: [-4, -(verticalArrowShift + arrowWidth)]\n    },\n    topRight: {\n      points: ['br', 'tc'],\n      offset: [horizontalArrowShift + arrowWidth, -4]\n    },\n    rightTop: {\n      points: ['tl', 'cr'],\n      offset: [4, -(verticalArrowShift + arrowWidth)]\n    },\n    bottomRight: {\n      points: ['tr', 'bc'],\n      offset: [horizontalArrowShift + arrowWidth, 4]\n    },\n    rightBottom: {\n      points: ['bl', 'cr'],\n      offset: [4, verticalArrowShift + arrowWidth]\n    },\n    bottomLeft: {\n      points: ['tl', 'bc'],\n      offset: [-(horizontalArrowShift + arrowWidth), 4]\n    },\n    leftBottom: {\n      points: ['br', 'cl'],\n      offset: [-4, verticalArrowShift + arrowWidth]\n    }\n  };\n  Object.keys(placementMap).forEach(key => {\n    placementMap[key] = arrowPointAtCenter ? Object.assign(Object.assign({}, placementMap[key]), {\n      overflow: getOverflowOptions(autoAdjustOverflow),\n      targetOffset\n    }) : Object.assign(Object.assign({}, placements[key]), {\n      overflow: getOverflowOptions(autoAdjustOverflow)\n    });\n    placementMap[key].ignoreShake = true;\n  });\n  return placementMap;\n}","map":{"version":3,"names":["placements","autoAdjustOverflowEnabled","adjustX","adjustY","autoAdjustOverflowDisabled","targetOffset","getOverflowOptions","autoAdjustOverflow","Object","assign","getPlacements","config","arrowWidth","horizontalArrowShift","verticalArrowShift","arrowPointAtCenter","placementMap","left","points","offset","right","top","bottom","topLeft","leftTop","topRight","rightTop","bottomRight","rightBottom","bottomLeft","leftBottom","keys","forEach","key","overflow","ignoreShake"],"sources":["/data/messenger.client/node_modules/antd/es/_util/placements.js"],"sourcesContent":["import { placements } from \"rc-tooltip/es/placements\";\nconst autoAdjustOverflowEnabled = {\n  adjustX: 1,\n  adjustY: 1\n};\nconst autoAdjustOverflowDisabled = {\n  adjustX: 0,\n  adjustY: 0\n};\nconst targetOffset = [0, 0];\nexport function getOverflowOptions(autoAdjustOverflow) {\n  if (typeof autoAdjustOverflow === 'boolean') {\n    return autoAdjustOverflow ? autoAdjustOverflowEnabled : autoAdjustOverflowDisabled;\n  }\n  return Object.assign(Object.assign({}, autoAdjustOverflowDisabled), autoAdjustOverflow);\n}\nexport default function getPlacements(config) {\n  const {\n    arrowWidth = 4,\n    horizontalArrowShift = 16,\n    verticalArrowShift = 8,\n    autoAdjustOverflow,\n    arrowPointAtCenter\n  } = config;\n  const placementMap = {\n    left: {\n      points: ['cr', 'cl'],\n      offset: [-4, 0]\n    },\n    right: {\n      points: ['cl', 'cr'],\n      offset: [4, 0]\n    },\n    top: {\n      points: ['bc', 'tc'],\n      offset: [0, -4]\n    },\n    bottom: {\n      points: ['tc', 'bc'],\n      offset: [0, 4]\n    },\n    topLeft: {\n      points: ['bl', 'tc'],\n      offset: [-(horizontalArrowShift + arrowWidth), -4]\n    },\n    leftTop: {\n      points: ['tr', 'cl'],\n      offset: [-4, -(verticalArrowShift + arrowWidth)]\n    },\n    topRight: {\n      points: ['br', 'tc'],\n      offset: [horizontalArrowShift + arrowWidth, -4]\n    },\n    rightTop: {\n      points: ['tl', 'cr'],\n      offset: [4, -(verticalArrowShift + arrowWidth)]\n    },\n    bottomRight: {\n      points: ['tr', 'bc'],\n      offset: [horizontalArrowShift + arrowWidth, 4]\n    },\n    rightBottom: {\n      points: ['bl', 'cr'],\n      offset: [4, verticalArrowShift + arrowWidth]\n    },\n    bottomLeft: {\n      points: ['tl', 'bc'],\n      offset: [-(horizontalArrowShift + arrowWidth), 4]\n    },\n    leftBottom: {\n      points: ['br', 'cl'],\n      offset: [-4, verticalArrowShift + arrowWidth]\n    }\n  };\n  Object.keys(placementMap).forEach(key => {\n    placementMap[key] = arrowPointAtCenter ? Object.assign(Object.assign({}, placementMap[key]), {\n      overflow: getOverflowOptions(autoAdjustOverflow),\n      targetOffset\n    }) : Object.assign(Object.assign({}, placements[key]), {\n      overflow: getOverflowOptions(autoAdjustOverflow)\n    });\n    placementMap[key].ignoreShake = true;\n  });\n  return placementMap;\n}"],"mappings":"AAAA,SAASA,UAAU,QAAQ,0BAA0B;AACrD,MAAMC,yBAAyB,GAAG;EAChCC,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE;AACX,CAAC;AACD,MAAMC,0BAA0B,GAAG;EACjCF,OAAO,EAAE,CAAC;EACVC,OAAO,EAAE;AACX,CAAC;AACD,MAAME,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC;AAC3B,OAAO,SAASC,kBAAkB,CAACC,kBAAkB,EAAE;EACrD,IAAI,OAAOA,kBAAkB,KAAK,SAAS,EAAE;IAC3C,OAAOA,kBAAkB,GAAGN,yBAAyB,GAAGG,0BAA0B;EACpF;EACA,OAAOI,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEL,0BAA0B,CAA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